<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> 前台导航列表</h3>
                </div>
                <div class="panel-body">
                    <div class="navbar navbar-default">
                        <div class="row navbar-form">
                            <button type="submit" onclick="location.href='{:U('Admin/System/addEditNav')}'"
                                    class="btn btn-primary pull-right"><i class="fa fa-plus"></i>新增导航
                            </button>
                        </div>
                    </div>

                    <div id="ajax_return">

                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th class="sorting text-center">导航名称</th>
                                    <th class="sorting text-center">链接地址</th>
                                    <th class="sorting text-center">是否显示</th>
                                    <th class="sorting text-center">是否新窗口</th>
                                    <th class="sorting text-center">排序</th>
                                    <th class="sorting text-center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="navigationList" id="list">
                                    <tr>
                                        <td class="text-left">{$list.name}</td>
                                        <td class="text-left">{$list.url}</td>
                                        <td class="text-center">
                                            <img width="20" height="20"
                                                 src="__PUBLIC__/images/<if condition='$list[is_show] eq 1'>yes.png<else />cancel.png</if>"
                                                 onclick="changeTableVal('navigation','id','{$list.id}','is_show',this)"/>
                                        </td>
                                        <td class="text-center">
                                            <img width="20" height="20"
                                                 src="__PUBLIC__/images/<if condition='$list[is_new] eq 1'>yes.png<else />cancel.png</if>"
                                                 onclick="changeTableVal('navigation','id','{$list.id}','is_new',this)"/>
                                        </td>
                                        <td class="sorting text-center">
                                            <input type="text" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                                   onpaste="this.value=this.value.replace(/[^\d]/g,'')"
                                                   onchange="updateSort('navigation','id','{$list.id}','sort',this)"
                                                   size="4" value="{$list.sort}"/>
                                        </td>
                                        <td class="text-right">
                                            <if condition="$list[url] != NULL">
                                                <a href="{$list.url}" target="_blank" data-toggle="tooltip" title=""
                                                   class="btn btn-info" data-original-title="查看导航">
                                                    <i class="fa fa-eye"></i>
                                                </a>
                                            </if>
                                            <a href="{:U('Admin/System/addEditNav',array('id'=>$list['id']))}"
                                               data-toggle="tooltip" title="" class="btn btn-primary"
                                               data-original-title="编辑"><i class="fa fa-pencil"></i></a>
                                            <a href="javascript:del_fun('{:U('System/delNav',array('id'=>$list['id']))}');"
                                               id="button-delete6" data-toggle="tooltip" title="" class="btn btn-danger"
                                               data-original-title="删除"><i class="fa fa-trash-o"></i></a>
                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>

                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$show}</div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
</body>
</html>